Optimal. Leaf size=245 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}-\sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-\sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.36, antiderivative size = 245, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3290, 3260,
212} \begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {(-a)^{5/8} \tanh (x)}{\sqrt {a \sqrt [4]{b}+(-a)^{5/4}}}\right )}{4 (-a)^{3/8} \sqrt {a \sqrt [4]{b}+(-a)^{5/4}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3260
Rule 3290
Rubi steps
\begin {align*} \int \frac {1}{a+b \cosh ^8(x)} \, dx &=\frac {\int \frac {1}{1-\frac {\sqrt [4]{b} \cosh ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1-\frac {i \sqrt [4]{b} \cosh ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1+\frac {i \sqrt [4]{b} \cosh ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1+\frac {\sqrt [4]{b} \cosh ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}\\ &=\frac {\text {Subst}\left (\int \frac {1}{1-\left (1-\frac {\sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\coth (x)\right )}{4 a}+\frac {\text {Subst}\left (\int \frac {1}{1-\left (1-\frac {i \sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\coth (x)\right )}{4 a}+\frac {\text {Subst}\left (\int \frac {1}{1-\left (1+\frac {i \sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\coth (x)\right )}{4 a}+\frac {\text {Subst}\left (\int \frac {1}{1-\left (1+\frac {\sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\coth (x)\right )}{4 a}\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [8]{-a} \tanh (x)}{\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}-\frac {\tanh ^{-1}\left (\frac {(-a)^{5/8} \tanh (x)}{\sqrt {(-a)^{5/4}+a \sqrt [4]{b}}}\right )}{4 (-a)^{3/8} \sqrt {(-a)^{5/4}+a \sqrt [4]{b}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.18, size = 158, normalized size = 0.64 \begin {gather*} 16 \text {RootSum}\left [b+8 b \text {$\#$1}+28 b \text {$\#$1}^2+56 b \text {$\#$1}^3+256 a \text {$\#$1}^4+70 b \text {$\#$1}^4+56 b \text {$\#$1}^5+28 b \text {$\#$1}^6+8 b \text {$\#$1}^7+b \text {$\#$1}^8\&,\frac {x \text {$\#$1}^3+\log (-\cosh (x)-\sinh (x)+\cosh (x) \text {$\#$1}-\sinh (x) \text {$\#$1}) \text {$\#$1}^3}{b+7 b \text {$\#$1}+21 b \text {$\#$1}^2+128 a \text {$\#$1}^3+35 b \text {$\#$1}^3+35 b \text {$\#$1}^4+21 b \text {$\#$1}^5+7 b \text {$\#$1}^6+b \text {$\#$1}^7}\&\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 1.11, size = 233, normalized size = 0.95
method | result | size |
risch | \(\munderset {\textit {\_R} =\RootOf \left (1+\left (16777216 a^{8}+16777216 a^{7} b \right ) \textit {\_Z}^{8}-1048576 a^{6} \textit {\_Z}^{6}+24576 a^{4} \textit {\_Z}^{4}-256 \textit {\_Z}^{2} a^{2}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 x}+\left (-\frac {4194304 a^{8}}{b}-4194304 a^{7}\right ) \textit {\_R}^{7}+\left (\frac {524288 a^{7}}{b}+524288 a^{6}\right ) \textit {\_R}^{6}+\left (\frac {196608 a^{6}}{b}-65536 a^{5}\right ) \textit {\_R}^{5}+\left (-\frac {24576 a^{5}}{b}+8192 a^{4}\right ) \textit {\_R}^{4}+\left (-\frac {3072 a^{4}}{b}-1024 a^{3}\right ) \textit {\_R}^{3}+\left (\frac {384 a^{3}}{b}+128 a^{2}\right ) \textit {\_R}^{2}+\left (\frac {16 a^{2}}{b}-16 a \right ) \textit {\_R} -\frac {2 a}{b}+1\right )\) | \(184\) |
default | \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (\left (a +b \right ) \textit {\_Z}^{16}+\left (-8 a +8 b \right ) \textit {\_Z}^{14}+\left (28 a +28 b \right ) \textit {\_Z}^{12}+\left (-56 a +56 b \right ) \textit {\_Z}^{10}+\left (70 a +70 b \right ) \textit {\_Z}^{8}+\left (-56 a +56 b \right ) \textit {\_Z}^{6}+\left (28 a +28 b \right ) \textit {\_Z}^{4}+\left (-8 a +8 b \right ) \textit {\_Z}^{2}+a +b \right )}{\sum }\frac {\left (-\textit {\_R}^{14}+7 \textit {\_R}^{12}-21 \textit {\_R}^{10}+35 \textit {\_R}^{8}-35 \textit {\_R}^{6}+21 \textit {\_R}^{4}-7 \textit {\_R}^{2}+1\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{15} a +\textit {\_R}^{15} b -7 \textit {\_R}^{13} a +7 \textit {\_R}^{13} b +21 \textit {\_R}^{11} a +21 \textit {\_R}^{11} b -35 \textit {\_R}^{9} a +35 \textit {\_R}^{9} b +35 \textit {\_R}^{7} a +35 \textit {\_R}^{7} b -21 \textit {\_R}^{5} a +21 \textit {\_R}^{5} b +7 \textit {\_R}^{3} a +7 \textit {\_R}^{3} b -\textit {\_R} a +\textit {\_R} b}\right )}{8}\) | \(233\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 661324 vs. \(2 (165) = 330\).
time = 3.30, size = 661324, normalized size = 2699.28 \begin {gather*} \text {too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{a + b \cosh ^{8}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.54, size = 1, normalized size = 0.00 \begin {gather*} 0 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________